<tree>
可以加上文字屬性跟顏色<tree decoration-bf="customer_rank >0"
decoration-danger="customer_rank >0 and supplier_rank >0"
decoration-warning ="supplier_rank > 0">
<field name="name"/>
<field name="user_id" widget="many2one_avatar_user"/>
<field name="state_id" optional="hide"/>
<field name="country_id" optional="show"/>
<field name="customer_rank" invisible="1"/>
<field name="supplier_rank" invisible="1"/>
</tree>
※decoration-bf
為粗體、decoration-danger
顯示紅色、decoration-warning
顯示黃色
<Search>
通常使用三種寫法會在搜尋欄位出現name、category_id、bank_ids來做為搜尋的依據:
<search>
<field name="name"/>
<field name='category_id" filter_domain="[('category_id','child_id','self')]"/>
<field name="bank_ids" widget="many2one"/>
</search>
會在Filters裡面作用,以Suppliers作為過濾的依據:
<search>
<filter name="suppliers" string="Suppliers" domain="[('supplier_rank', '>', 0)]"/>
</search>
會在Group By裡面作用,以Conutry作為分組的依據:
<search>
<group expand="0" string="Group By">
<filter string="Country" name="country" context="{'group_by':'country_id'}"/>
</group>
</search>
#### ※可以加入這段來使的畫面出現左邊分類工具欄
```CMD
<searchpanel>
<field name="user_id" icon="fa fa-users"/>
<field name="category_id" icon="fa fa-list" select="multi"/>
</searchpanel>
form_view_ref
與tree_view_ref
可以指定開啟的view
<field name="context">
{'tree_view_ref':'my_module.tree_all_contants'}
</field>